import { createRouter, createWebHashHistory, RouteLocationNormalized, RouteRecordRaw, RouterOptions } from 'vue-router'
import Data2 from './views/team/data2.vue'
import User from './views/User/index.vue'
import Users from './views/users/index.vue'
import integral from './views/User/integral.vue'
import Login from './views/login.vue'

function toID(rote: RouteLocationNormalized): Record<string, any> {
  return {
    ID: Number(rote.params.ID)
  }

}

const routes: RouteRecordRaw[] = [
  {
    path: '/login',
    name: '登录',
    component: Login
  },
  {
    path: '/',
    name: '用户',
    component: User,
  },
  {
    path: '/users',
    name: '绑定中心',
    component: Users,
  },
  {
    path: '/integral',
    name: '积分',
    component: integral,
  },
  {
    path: '/team/:teamid/teamdata/questiondata',
    name: '成员测评记录',
    component: Data2,
    prop: true
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,

})

export default router
